#ifndef __NETWORK_H__
#define __NETWORK_H__

/**
  ******************************************************************************
  * @file           : network.h
  * @brief          : Header for network.cpp file.
  *                   This file contains the common defines of the application.
  * @author			: ac
  * @attention
  *
  *		Copyright (c) 2023 Technology Co., Ltd.
  *
  *******************************************************************************
  */

#ifdef __cplusplus
extern "C"
{
#endif

/*
 * macro definition
 */
#ifndef SOCKET
#define SOCKET	int
#endif

#define RTK_UDP_SERVER_PORT 10087
#define BUFF_LEN 1024
#define RTK_UDP_SERVER_IP "172.31.0.1"


/*
 * enum and struction
 */






/*
 * exported functions prototypes
 */ 
int udp_init(void);
bool udp_send_data(SOCKET SocketFd,const char *pSerIP,unsigned short Port,void *pBuff, int len);
void udp_send_msg(int fd, struct sockaddr* dst, unsigned char * buf, int len);
void handle_udp_msg(int fd);
void * udp_recv(void *arg);
void udp_uninit();
void * tcp_recv(void *arg);
int tcp_send(char *psend, int len);
int tcp_init();
void tcp_uninit();
void analysis(unsigned char * pdata, int len);


#ifdef __cplusplus
}
#endif

#endif /* __NETWORK_H__ */

